package com.waiting.nio;

import java.io.PrintWriter;
import java.net.Socket;

/**
 * @Description
 * @Author bjweitingting
 * @Date 2018/10/17
 **/
public class RequestHandler extends Thread {
    private Socket socket;

    RequestHandler(Socket socket) {
        this.socket = socket;
    }

    @Override
    public void run() {
        try (PrintWriter out = new PrintWriter(socket.getOutputStream())) {
            out.print("hello wold");
            out.flush();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
